﻿using AutoMapper;
using BncMall.Model;
using BncMall.Model.DtoModels;
using BncMall.Model.Models;
using BncMall.Model.ViewModels;

namespace BncMall.AutoMapper
{
    public class MemberProfile : Profile
    {
        /// <summary>
        /// 配置构造函数，用来创建关系映射
        /// </summary>
        public MemberProfile()
        {
            CreateMap<Member_Address, MemberAddressDetailFrontViewModel>().ReverseMap();
            CreateMap<Member_Address, AddAddressDto>().ReverseMap();
            CreateMap<Member_Address, UpdateAddressDto>().ReverseMap();
            CreateMap<Member_StoreInfo, StoreInfoViewModel>().ReverseMap();
            CreateMap<Member_StoreInfo, UpdateStoreInfoDto>().ReverseMap();
            CreateMap<Member_Address, ShoppingCartSettleListAddressViewModel>().ReverseMap();
            CreateMap<Member_WalletAccount, WalletAccountViewModel>().ReverseMap();

            CreateMap<Member_StoreInfo, StoreInfoListViewModel>().ReverseMap();
        }
    }
}
